<#include "/tags/userAvatar.ftl">
<#include "/tags/DDMMYYYY.ftl">
<#include "/tags/likeTag.ftl">
<#include "/tags/likeListTag.ftl">
<#include "/tags/entryAvatar.ftl">
<#include "/tags/updatedSinceTag.ftl">
<#include "/tags/commentTag.ftl">
<#include "/tags/commentBoxTag.ftl">
<#include "/tags/commentPackageTag.ftl">

<#macro goalEntry title goalId goalTitle youLikeThis likeCount cheerCount commentCount 
		entryUpdatedSince goalCreatedDate imgURL
		ownerName body entryId cheerCount commentCount createdDate createdMonth createdYear
		comments entryId ownerAvatar='/images/avatar.png'>
	<script type="text/javascript">
		jQuery(document).ready(function(){
			bindDeleteEntry();
		});
	</script>
	<div class="avatar fl">
		<@userAvatar avatar=ownerAvatar imgWidth="74" imgHeight="74"/>
	</div>
	<div class="goalEntryContainer">
		<div class="entryPostTitle"  style="padding-top:0px">
			<span class="goalEntryName"><b>${rc.getMessage("page.dashboard.goal")}:</b> <a href="${rc.contextPath}/goal/view/${goalId}">${goalTitle}</a></span>
			<label>${rc.getMessage("page.dashboard.goalCreatedDate")}: <b>${goalCreatedDate}</b> </label>
		</div>
		<p class="userPostIt">Gửi bởi: <a href="/${ownerName}">${ownerName}</a></p>
		<div class="entryContentEditor" rel="ENTRY_${entryId}">
			<@entryAvatar url=imgURL alt=title id=entryId />
			<h1><a href="${rc.contextPath}/entry/view/${entryId}">${title}</a></h1>
			<p rel="readmore" class="text">${body}</p>
			<!--p class="text readmore"><a href="#">[ĐỌC THÊM]</a></p-->        
		</div>
		<@commentsPkg componentId=entryId component="GOAL_ENTRY" commentCount=commentCount likeCount=likeCount youLikeThis=youLikeThis
					comments=comments showEditComponent="on" showCommentInput="on" showLikeButton="on" entryOwner=ownerName/>
	</div>
</#macro>